package org.tloss.web.editor.enity.service;

import java.util.HashMap;
import java.util.Map;

import org.tloss.web.editor.database.editors.jdbc.Table;
import org.tloss.web.editor.model.Database;

public class MySqlGenerateEntity implements GenerateEntity {

	Map<Integer, String> typeMapping = new HashMap<Integer, String>();

	public MySqlGenerateEntity() {
		GenerateEntityUtils.generateDefaultMapping(typeMapping);
	}

	@Override
	public boolean supported(Database database) {
		return GenerateEntityUtils.supportedByURL(database, "mysql");
	}

	@Override
	public Table generate(Table table) {
		return GenerateEntityUtils.generateByMapping(table, typeMapping);
	}
}
